<?php 
//include "../isa_style_qa.css";

// Lay cac thong so cau hinh chung
include "../app_global.php";
// Lay cac hang so dung chung
include "../const.php";
// Ham thuc hien lay ten file va hien thi noi dung
include "../isa-lib/isa-function/isa_public_function.php";
//Ham thuc hien tao cay
include_once("../isa-lib/isa-function/class_xslt.php");//Khai bao su dung cac ham dung chung 
include "../connect_ado.php";
include "../connect.php";
include "../onegate_function.php";
include "../test_login.php";
// Khoi tao cac bien SESSION chua quyen modul, function cua NSD
include "../init_session.php";
// Lay cac thong so cau hinh rieng cho chuc nang nay
include "app_local.php";
// Lay cac hang so cua chuc nang nay
include "const.php";
if (!isset($_REQUEST['modal_dialog_mode'])) {
	include "../dsp_header.php";
}else{
	include "../dsp_modal_dialog_header.php";
}

include_once $FOLDER_DEVEDIT_CLASS;
?>
<script src="../isa-lib/isa-js/isa_util.js" ></script>
<!--<script src="../../js_isaweb.js" ></script>-->
<script src="js_qa.js" ></script><?php
#echo $fuseaction . '<br>';
switch($fuseaction) {	
	 case "DISPLAY_ALL_QA_QUESTION";
	 if ($v_is_granted_qa_question_view) {
	 	include "qry_all_cate_for_staff.php";
		include "qry_all_agency_for_staff.php";	
		include "qry_all_qa_question.php";
		include "dsp_all_qa_question.php"; 
	    break;
	 }
	 case "DISPLAY_SINGLE_QA_QUESTION";	
	 	include "qry_all_qa_question_file.php";	
		include "qry_all_cate_for_staff.php";
		include "qry_all_agency_for_staff.php";		
	 	include "qry_all_qa_answer_file.php";	 		
		include "qry_single_qa_question.php";
		include "qry_permission_approver.php";
		include "qry_permission_answer.php";
		include "dsp_single_qa_question.php";	 
		break;
	 case "UPDATE_QA_QUESTION"; 
	  if ($v_is_granted_qa_question_update) {
		include "act_update_qa_question.php";
		break;		
		}
	 case "DELETE_QA_QUESTION";
	  if ($v_is_granted_qa_question_delete) {
		include "act_delete_qa_question.php"; 
		break;
		}
	 case "DISPLAY_SINGLE_QA_QUESTION_FOR_APPROVE";	
	 	include "qry_all_qa_question_file.php";	 
	 	include "qry_all_qa_answer_file.php";	 		
		include "qry_single_qa_question.php";
		include "qry_permission_approver.php";
		include "dsp_single_qa_question_for_approve.php";	 
		break;
	case "APPROVE_QA_QUESTION";
	 if ($v_is_granted_qa_question_approve) {
		include "act_approve_qa_question.php"; 
		break;
		}
	 case "DISPLAY_ALL_cate_FOR_SELECTING";	
		include "qry_all_cate_for_selecting.php";
		include "dsp_all_cate_for_selecting.php";	 
		break;
	 //Gui cau hoi
	 case "DISPLAY_SINGLE_QA_QUESTION_FOR_SENDING";	
		include "dsp_single_qa_question_for_sending.php";	 
		break;
	 case "SEND_QA_QUESTION"; 
		include "act_send_qa_question.php";
		break;
	case "DISPLAY_ALL_STAFF_BY_UNIT";
		include "dsp_all_staff_by_unit.php";
		break;				
	 default: 
	 if ($v_is_granted_qa_question_view) {
		include "qry_all_cate_for_staff.php";
		include "qry_all_agency_for_staff.php";		
	    include "qry_all_qa_question.php";
	    include "dsp_all_qa_question.php"; 
	    break; 
	}else{?>
		<script language="javascript">
				window.location = "../record/archives/index.php?fuseaction=DISPLAY_ALL_RECORD_ARCHIVES"
		</script><?php	
	}
}
include "../disconnect.php";
if (!isset($_REQUEST['modal_dialog_mode'])) {
	include "../dsp_footer.php";
}else{
	include "../dsp_modal_dialog_footer.php";
}
?>